package remote

import (
	"rc/remote/param"
	"rc/remote/ssh"
)

type Remote interface {
	// Login login with shell
	Login() error
	// Exec execute cmd by execUser
	Exec(execUser, cmd string) *param.ExecOutput
	// ExecInteractive execute cmd by execUser
	ExecInteractive(execUser, cmd string) error
	// Get get file from remote server
	Get(localPath, remotePath string) *param.RcpOutput
	// Put put file from remote server
	Put(localPath, remotePath string) *param.RcpOutput
}

// New create repo instance
func New(user, password, keyPath, host string, port int) Remote {
	return ssh.NewSSHRemote(user, password, keyPath, host, port)
}
